<?php
 /* include_once $_SERVER['DOCUMENT_ROOT'].'/PariGest/pages/inc/entete.php';*/
  require_once $REP_CLASS . 'class.Pari.php';
  require_once $REP_CLASS . 'class.Compte.php';
  
  try
  {
    $pari = new Pari($db);
    
    $idCompte = "0";
    if( isset($_COOKIE[Compte::$ID_COMPTE_SESSION]) ) 
      $idCompte = $_COOKIE[Compte::$ID_COMPTE_SESSION];
    
    $stmt = $pari->selectParisEncours($idCompte);
    
    $smarty->assign('LstParis', $stmt->fetchAll());
    $smarty->assign('NbParis', $stmt->rowCount());
  }
  catch(MyException $e)
  {
    $trace->fb('!!!!! ERREUR !!!!!');
    include $_SERVER['DOCUMENT_ROOT'].'/PariGest/pages/inc/catch.php';
  }
    
  //$smarty->display('ParisEnCours.tpl');
?>
